home *** CD-ROM | disk | FTP | other *** search
- G4C
- ; $VER: func.mfind Rev.018 by Juan Manuel Wehrli 1999 - 2000
- WINBIG -1 -1 350 130 "Durchsuchen"
- WinType 11010000
- WinBackground IMAGE BG 0
- Winout "NIL:"
-
- xOnLoad
- SetGad #This 100 HIDE
- SetGad #This 101 HIDE
- if $*was = 1
- SetGad #This 2 OFF
- elseif $*was != 1
- SetGad #This 2 ON
- endif
- GuiOpen #This
-
- xOnOpen
- if $*suchstr != ""
- SetVar suchstr $*suchstr
- Update #This 1 $*suchstr
- endif
- if $*filestr != ""
- SetVar filestr $*filestr
- Update #This 4 $*filestr
- endif
- if $*art != ""
- SetVar art $*art
- Update #This 2 $*art
- elseif $*art == ""
- SetVar *art "0"
- SetVar art "0"
- Update #This 2 "0"
- endif
- if $*was != ""
- SetVar was $*was
- Update #This 3 $*was
- elseif $*was == ""
- SetVar was "0"
- SetVar *was "0"
- Update #This 3 "0"
- endif
-
- xOnQuit
- SetVar *suchstr $suchstr
- SetVar *filestr $filestr
- SetVar *art $art
- SetVar *was $was
-
- ;Hintergrund Listview
- XLISTVIEW 1300 1000 50 55 "" "liste" "" 0 "Multi"
- GadID 100
-
- XLISTVIEW 1300 1000 50 55 "" "liste2" "" 0 "Multi"
- GadID 101
-
- xTextIn 125 5 200 20 "Namensmuster:" filestr "#?" 255
- GadID 4
- GadFont "xHelvetica.font" "11" 000
- SetVar *filestr $filestr
-
- xTextIn 125 25 200 20 "Suche in Datei nach:" suchstr "" 255
- GadID 1
- GadFont "xHelvetica.font" "11" 000
- SetVar *suchstr $suchstr
-
- xRadio 125 60 12 12 art 5
- GadFont "xHelvetica.font" "11" 000
- GadID 2
- RSTR "Auflisten" "0"
- RSTR "Öffnen" "1"
-
- xRadio 312 60 12 12 was 5
- GadFont "xHelvetica.font" "11" 000
- GadID 3
- RSTR "Selektierte Dateien" "0"
- RSTR "Verzeichnis sammt Unterverz." "1"
- if $was = 1
- SetGad #This 2 OFF
- elseif $was = 0
- SetGad #This 2 ON
- endif
- PartRedraw #This 125 60 20 50
-
-
- xButton 5 105 85 18 "_1 Starten"
- GadKey "1"
- GadFont "xHelvetica.font" "11" 000
- GuiClose #This
- Update "Infobar" 1 "Suche ... Bitte haben Sie Geduld, kann eine Weile dauern ..."
- if $was = "0"
- if $art = "0"
- LVUSE HTMLEXT 3
- LVMulti First
- while $$lv.line > ""
- JoinFile $$lv.dir $$lv.rec file
- Update "Infobar" 1 "Durchsuche $file nach $suchstr ..."
- CLI 'search FROM $file SEARCH $suchstr QUIET PATTERN >t:HTMLEXT/find.list'
- CLI 'LIST LFORMAT="%L" t:HTMLEXT/find.list >env:.htmlext.tmp'
- if $.htmlext.tmp = "empty"
- CLI 'delete t:HTMLEXT/find.list'
- Update "Infobar" 1 "Durchsuche ... Nichts gefunden!"
- else
- LVUSE #This 100
- LVGO FIRST
- LVADD "$file"
- Update "Infobar" 1 "Füge Eintrag $file hinzu ..."
- LVUSE HTMLEXT 3
- endif
- LVMulti OFF
- LVMulti Show
- LVMulti First
- EndWhile
- LVUSE #This 100
- LVSave "t:htmlext/find.list2"
- GuiLoad "htmlext:gui/func.mfindlv"
- Update "Infobar" 1 "Komplett!"
- LVUSE func.mfindlv 1
- LVChange "t:htmlext/find.list2"
- elseif $art = "1"
- LVUSE HTMLEXT 3
- LVMulti First
- while $$lv.line > ""
- JoinFile $$lv.dir $$lv.rec file
- Update "Infobar" 1 "Durchsuche $file nach $suchstr ..."
- CLI 'search FROM $file SEARCH "$suchstr" QUIET >t:HTMLEXT/find.list'
- CLI 'LIST LFORMAT="%L" t:HTMLEXT/find.list >env:.htmlext.tmp'
- if $.htmlext.tmp = "empty"
- CLI 'delete t:HTMLEXT/find.list'
- Update "Infobar" 1 "Durchsuche ... Nichts gefunden!"
- else
- Update "Infobar" 1 "Öffne $file mit Editor ..."
- CLI 'rx $*EDITOR OPENNEW "$file"'
- CLI 'rx $*EDITOR FIND "$suchstr"'
- endif
- LVMulti OFF
- LVMulti Show
- LVMulti First
- EndWhile
- endif
- elseif $was = "1"
- LVUSE HTMLEXT 3
- Update "Infobar" 1 "Suche alle Dateien im Verzeichnis $$LV.DIR die dem Pattern $filestr entsprechen."
- FailAt 21
- CLI 'LIST $$LV.DIR PAT="$filestr" LFORMAT="%P%N" ALL >t:HTMLEXT/find.list'
- LVUSE #This 100
- LVChange "t:htmlext/find.list"
- LVMulti ALL
- LVMulti First
- Update "Infobar" 1 "Durchsuche herausgefilterte Dateien ... anz.: $$LV.TOTAL"
- while $$lv.line > ""
- Update "Infobar" 1 "Durchsuche Datei $$LV.REC ... $$LV.LINE / $$LV.TOTAL"
- CLI 'search FROM "$$LV.REC" SEARCH "$suchstr" QUIET PATTERN >env:.htmlext.tmp'
- if $.htmlext.tmp != ""
- LVUSE #This 101
- LVADD $.htmlext.tmp
- Update "Infobar" 1 "Suchmuster gefunden ... bisher $$LV.TOTAL Einträge gefunden."
- LVUSE #This 100
- endif
- LVMulti OFF
- LVMulti First
- endwhile
- LVUSE #This 101
- Update "Infobar" 1 "Suche abgeschlossen ... Suchmuster $$LV.TOTAL gefunden ..."
- LVSave "t:htmlext/find.list2"
- GuiLoad "htmlext:gui/func.mfindlv"
- CLI 'delete t:HTMLEXT/find.list'
- endif
- GuiQuit #This
-
- xButton 260 105 85 18 "[_x] Abbrechen"
- GadKey "x"
- GadFont "xHelvetica.font" "11" 000
- GuiQuit #This
-
-